import request from '@/utils/request'

export default {
    //条件查询分页
    //current 当前页；limit 每页记录数
    getBannerListPage(page, limit) {
        return request({
            url: `/educms/banner/pageBanner/${page}/${limit}`,
            method: 'get',
        })
    },

    //删除
    delBannerById(bannerId) {
        return request({
            url: `/educms/banner/delBanner/${bannerId}`,
            method: 'delete'
        })
    },

    //添加
    addBanner(banner) {
        return request({
            url: `/educms/banner/addBanner`,
            method: 'post',
            data: banner
        })
    },

    //根据id查询
    getBannerById(bannerId){
        return request({
            url: `/educms/banner/getBannerById/${bannerId}`,
            method: 'post'
        })
    },

    //修改
    updateBanner(banner){
        return request({
            url: `/educms/banner/updateBanner`,
            method: 'post',
            data: banner
        })
    }
}